package com.kjtpay.design_pattern.adapter;

class Translator extends Player {
    private ForeignCenter foreignCenter = new ForeignCenter();

    public Translator(String name) {
        this.name = name + "的翻译";
        foreignCenter.setName(name);
    }

    @Override
    public void attack() {
        foreignCenter.进攻();
        action = foreignCenter.getAction();
    }

    @Override
    public void defence() {
        foreignCenter.防守();
        action = foreignCenter.getAction();
    }
}
